package com.elasticsearch.jd_study;


import com.springBootStudy.mybatis.MybatisRun;
import com.springBootStudy.mybatis.oneToMany.mapper.StaffMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = MybatisRun.class)
@EnableAutoConfiguration
public class Dept1ToMany {

    @Resource
    private StaffMapper staffMapper;

    @Test
    public void test(){

        System.out.println(staffMapper.findDeptOneToManyStaff());
        //返回值
        // Dept(
        // deptNo=2,
        // deptName=技术部,
        // isValid=N,
        // staffs=[Staff(staffNo=100002, staffName=李四), Staff(staffNo=100003, staffName=王五
        // )])

    }


    @Test
    public void test1(){

        System.out.println(staffMapper.annotionDeptStaff());
    }

}
